Skip to content

Phase 0: static site monorepo foundation#2141

Merged
bpamiri merged 11 commits into
developfrom
peter/static-site-foundation
Apr 17, 2026
Merged

Phase 0: static site monorepo foundation#2141
bpamiri merged 11 commits into
developfrom
peter/static-site-foundation

Conversation

@bpamiri

@bpamiri bpamiri commented Apr 17, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Adds web/ monorepo (pnpm workspace) with four Astro sites: landing, blog, guides (Starlight), api (Starlight)
  • Adds shared @wheels-dev/ui package with Header, Footer, design tokens
  • All four sites build cleanly and render a "Coming soon" placeholder
  • Adds .prettierignore to scope prettier to source files only
  • No real content yet — migrations come in Phases 1–4

Context

Phase 0 of the wheels.dev static-site migration. Full plan lives in the wheels.dev repo at docs/superpowers/plans/2026-04-17-phase-0-foundation.md.

Subsequent phases:

  • Phase 1: migrate blog from DB to markdown, Giscus comments, Buttondown newsletter
  • Phase 2: generate API reference from docs/api/*.json into Starlight
  • Phase 3: migrate guides from docs/src/ into Starlight, freeze 3.0 and 2.5 snapshots
  • Phase 4: replace landing page, retire the CFWheels wheels.dev app

Test plan

  • cd web && pnpm install && pnpm build succeeds (all 4 sites)
  • pnpm format:check passes
  • pnpm -r --filter './sites/*' exec astro check passes (0 errors/warnings/hints)
  • Cloudflare Pages preview deploy succeeds for each of the four projects
  • DNS for blog / guides / api subdomains resolves to CF Pages
  • Each production URL serves the placeholder page
  • wheels.dev apex NOT changed (landing preview via *.pages.dev only until Phase 4)

bpamiri added 8 commits April 17, 2026 09:47
Prepares for Astro monorepo under web/ in upcoming phases.
Sets up the monorepo root that will house four Astro sites and
a shared UI package. No sites yet — that's the next task.
Initial @wheels-dev/ui workspace package. Exports two Astro components
and a tokens.css file to be imported by each site.
Astro 5 site that will serve wheels.dev. Uses shared @wheels-dev/ui
Header and Footer. Builds clean.
Placeholder Astro site for blog.wheels.dev. Real content collections
and post pages come in Phase 1.
Placeholder Starlight site for guides.wheels.dev. Real guide content
migrates from docs/src in Phase 3.
Placeholder Starlight site for api.wheels.dev. Function reference
generation from docs/api/v*.json comes in Phase 2.
Plan oversight: Task 3 didn't include a .prettierignore, so format:check
was scanning generated dist/, .astro/, and pagefind/ output. Adding the
ignore file and running pnpm format to bring all source files in line.
@github-actions github-actions Bot added docs dependencies Pull requests that update a dependency file javascript Pull requests that update javascript code labels Apr 17, 2026
bpamiri added 3 commits April 17, 2026 11:27
Astro 5 Content Layer requires an explicit collection config. Starlight's
built-in docsLoader() resolves the base path without a './' prefix, which
Astro's glob loader doesn't handle correctly in our pnpm monorepo —
the collection ends up empty and only 404.html gets generated.

Using astro/loaders glob directly with base './src/content/docs' restores
index.html generation for both guides and api sites.
Matrix job builds and deploys each of the four sites (landing, blog,
guides, api) via cloudflare/wrangler-action on push to develop (production
deploy) and on PRs (preview deploy with a unique URL).

Path filter limits runs to actual web/ changes. Concurrency group
cancels in-progress deploys when newer commits land.

Requires two repo secrets:
- CLOUDFLARE_API_TOKEN (Pages:Edit on this account)
- CLOUDFLARE_ACCOUNT_ID
Two issues from first run on PR #2141:

1. Workflow-level 'concurrency' block referenced matrix.site, which
   only exists at job level. Moved the concurrency declaration into
   the deploy job so each site gets its own concurrency key.

2. Commitlint scope-enum rejected 'web', 'web/ui', 'web/landing',
   'web/blog', 'web/guides', 'web/api', 'web/starlight'. Added them
   to the allowlist — establishes scope vocabulary for the static-site
   monorepo going forward.
@bpamiri
bpamiri marked this pull request as ready for review April 17, 2026 18:55
@bpamiri
bpamiri merged commit a5d72d0 into develop Apr 17, 2026
7 checks passed
@bpamiri
bpamiri deleted the peter/static-site-foundation branch April 17, 2026 18:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

dependencies Pull requests that update a dependency file docs javascript Pull requests that update javascript code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant